Page({
    data: {
        time: "5s",
        colors: [ "#f7f7f7", "#ebd4ef", "#5990ab", "#fbbd08", "#1cbbb4", "#e54d42", "#9c26b0", "#a5673f", "#39b54a", "#0081ff" ],
        contents: [ "嗨起来", "今晚哪里嗨", "我爱你", "我喜欢你", "小姐姐 有男朋友吗", "小哥哥，请我看电影", "大吉大利，今晚吃鸡", "小哥哥，你看我长得咋样", "快点啊 我等到花儿也谢了", "对面的，我家亲戚想认识你", "小哥哥 你愿意做我的奥力给吗？因为我想泡你。", "能不能和我拍个照？因为我要向同事证明，天使是存在的" ],
        changing: !1,
        status: {
            curColor: 0,
            curContent: -1
        }
    },
    showModal: function(t) {
        this.setData({
            modalName: t.currentTarget.dataset.target
        });
    },
    hideModal: function() {
        this.setData({
            modalName: null
        });
    },
    colorChange: function(t) {
        var e = Number(t.currentTarget.dataset.index);
        this.setData({
            "status.curColor": e
        });
    },
    contentChange: function(t) {
        this.setData({
            changing: !0
        });
        var e = Number(t.currentTarget.dataset.index);
        this.setData({
            "status.curContent": e,
            changing: !1
        }), this.setTime();
    },
    setTime: function() {
        var t = this;
        wx.createSelectorQuery().select("#runtext").fields({
            node: !0,
            size: !0
        }).exec(function(e) {
            var n = wx.getSystemInfoSync(), a = e[0].width / n.screenWidth * 3;
            a < 8 && (a = 8), t.setData({
                time: a + "s"
            });
        });
    },
    onLoad: function(t) {
        this.setTime();
    },
    onReady: function() {
        wx.setKeepScreenOn({
            keepScreenOn: !0
        });
    },
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {}
});